package com.demo.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.entity.SysDept;
import com.demo.entity.SysDriver;
import com.demo.mapper.SysDeptMapper;
import com.demo.mapper.SysDriverMapper;
import com.demo.service.SysDriverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * 司机Service业务层处理
 *
 * @author 1111
 * @date 2023-12-02
 */
@Service
public class SysDriverServiceImpl extends ServiceImpl<SysDriverMapper, SysDriver> implements SysDriverService {
    @Resource
    private SysDriverMapper sysDriverMapper;

    /**
     * 查询司机
     *
     * @param id 司机主键
     * @return 司机
     */
    @Override
    public SysDriver selectSysDriverById(Long id) {
        return sysDriverMapper.selectSysDriverById(id);
    }

    /**
     * 查询司机列表
     *
     * @param sysDriver 司机
     * @return 司机
     */
    @Override
    public List<SysDriver> selectSysDriverList(SysDriver sysDriver) {
        return sysDriverMapper.selectSysDriverList(sysDriver);
    }

    /**
     * 新增司机
     *
     * @param sysDriver 司机
     * @return 结果
     */
    @Override
    public int insertSysDriver(SysDriver sysDriver) {
        return sysDriverMapper.insertSysDriver(sysDriver);
    }

    /**
     * 修改司机
     *
     * @param sysDriver 司机
     * @return 结果
     */
    @Override
    public int updateSysDriver(SysDriver sysDriver) {
        return sysDriverMapper.updateSysDriver(sysDriver);
    }

    /**
     * 批量删除司机
     *
     * @param ids 需要删除的司机主键
     * @return 结果
     */
    @Override
    public int deleteSysDriverByIds(Long[] ids) {
        return sysDriverMapper.deleteSysDriverByIds(ids);
    }

    /**
     * 删除司机信息
     *
     * @param id 司机主键
     * @return 结果
     */
    @Override
    public int deleteSysDriverById(Long id) {
        return sysDriverMapper.deleteSysDriverById(id);
    }
}
